package cn.lsj.core.factory;

import cn.lsj.core.entity.Configuration;
import cn.lsj.openapi.SqlSession;
import cn.lsj.openapi.SqlSessionImpl;

/**
 * @className: SqlSessionFactory
 * @description: TODO 类描述
 * @author: liangshijie
 * @date: 2023/3/11
 **/
public class SqlSessionFactory {

    private Configuration configuration;
    public SqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }
    /**
     * 创建SqlSession会话
     */
    public SqlSession openSession(){
        return new SqlSessionImpl(configuration);
    }

}
